import QtQuick 2.15
import QtQuick.Controls 2.15


Button {
	property string source: ''
	property string toolTip: ''
	property int iconWidth: 32
	property int iconHeight: 32
	property bool isChecked: false
	property bool isCheckable: false
	id: self
	icon.source: source
	icon.height: iconHeight
	icon.width: iconWidth
	
	background: Rectangle {
		color: self.down || (isCheckable && self.checked) ? Qt.color('#497563') : Qt.color('#20E9F4FF')
		radius: 3
	}
	icon.color: self.down || (isCheckable && self.checked) ? Qt.color('#FFFFFF') : Qt.color('#E2F0F8')
	checkable: isCheckable
	checked: isChecked
	ToolTip.visible: hovered
	ToolTip.text: toolTip
}
